.class public Lcom/estrongs/android/ui/dlna/dialog/a;
.super Lcom/estrongs/android/ui/dialog/q;
.source "CastScreenRecomPhoneInstallDialog.java"


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/RelativeLayout;

.field private c:Landroid/widget/ImageView;

.field private d:Landroid/widget/TextView;

.field public e:Lcom/estrongs/android/pop/app/filetransfer/server/a;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/dialog/q;-><init>(Landroid/content/Context;)V

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->a:Landroid/content/Context;

    .line 3
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/dialog/a;->init()V

    return-void
.end method

.method private a(Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->a:Landroid/content/Context;

    const v1, 0x7f0700fa

    invoke-static {v0, v1}, Lcom/estrongs/android/pop/utils/t;->a(Landroid/content/Context;I)I

    move-result v0

    iget-object v2, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->a:Landroid/content/Context;

    .line 2
    invoke-static {v2, v1}, Lcom/estrongs/android/pop/utils/t;->a(Landroid/content/Context;I)I

    move-result v1

    const-string v2, "0"

    .line 3
    invoke-static {p1, v0, v1, v2}, Lcom/estrongs/android/util/i0;->a(Ljava/lang/String;IILjava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object p1

    return-object p1
.end method

.method private a(I)Ljava/lang/String;
    .locals 3

    .line 8
    invoke-static {}, Lcom/estrongs/android/util/f0;->b()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object v0, v1, v2

    .line 9
    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    const/4 v0, 0x1

    aput-object p1, v1, v0

    const-string p1, "%s:%d"

    invoke-static {p1, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method private a()V
    .locals 3

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageResourcePath()Ljava/lang/String;

    move-result-object v0

    .line 5
    new-instance v1, Lcom/estrongs/android/pop/app/filetransfer/server/a;

    const/16 v2, 0x1f90

    invoke-direct {v1, v0, v2}, Lcom/estrongs/android/pop/app/filetransfer/server/a;-><init>(Ljava/lang/String;I)V

    iput-object v1, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->e:Lcom/estrongs/android/pop/app/filetransfer/server/a;

    .line 6
    :try_start_0
    invoke-virtual {v1}, Lcom/estrongs/android/pop/app/filetransfer/server/NanoHTTPD;->b()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 7
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :goto_0
    return-void
.end method

.method private b()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->e:Lcom/estrongs/android/pop/app/filetransfer/server/a;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/server/NanoHTTPD;->c()V

    :cond_0
    return-void
.end method

.method private init()V
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const/4 v1, 0x0

    const v2, 0x7f0c00d4

    .line 2
    invoke-virtual {v0, v2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    const v2, 0x7f09098d

    .line 3
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/RelativeLayout;

    iput-object v2, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->b:Landroid/widget/RelativeLayout;

    const v2, 0x7f0908a0

    .line 4
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->c:Landroid/widget/ImageView;

    const v2, 0x7f090d8b

    .line 5
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->d:Landroid/widget/TextView;

    const/16 v2, 0x1f90

    .line 6
    invoke-direct {p0, v2}, Lcom/estrongs/android/ui/dlna/dialog/a;->a(I)Ljava/lang/String;

    move-result-object v2

    .line 7
    iget-object v3, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->d:Landroid/widget/TextView;

    invoke-virtual {v3, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 8
    invoke-direct {p0, v2}, Lcom/estrongs/android/ui/dlna/dialog/a;->a(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 9
    iget-object v3, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->c:Landroid/widget/ImageView;

    invoke-virtual {v3, v2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 10
    :cond_0
    iget-object v2, p0, Lcom/estrongs/android/ui/dlna/dialog/a;->b:Landroid/widget/RelativeLayout;

    new-instance v3, Lcom/estrongs/android/ui/dlna/dialog/a$a;

    invoke-direct {v3, p0}, Lcom/estrongs/android/ui/dlna/dialog/a$a;-><init>(Lcom/estrongs/android/ui/dlna/dialog/a;)V

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 11
    invoke-virtual {p0, v1}, Lcom/estrongs/android/ui/dialog/q;->setTitle(Ljava/lang/CharSequence;)V

    .line 12
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/dialog/q;->setContentView(Landroid/view/View;)V

    .line 13
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/dialog/a;->a()V

    return-void
.end method


# virtual methods
.method public dismiss()V
    .locals 0

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/ui/dialog/q;->dismiss()V

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/dialog/a;->b()V

    return-void
.end method
